checkout/commit: Use glnx_regfile_copy_bytes() if possible
authorColin Walters <walters@verbum.org>
Thu, 27 Apr 2017 18:24:20 +0000 (14:24 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Wed, 10 May 2017 15:10:30 +0000 (15:10 +0000)
commit63497c65f33c9e564f7c83b98b39a4fe7f588524
tree8dfb38f1b4c9a18daef34a1672054baa7cb049d9
parent05fda71cb1f8f0709a7e8c090ed6490aa8d3c089
checkout/commit: Use glnx_regfile_copy_bytes() if possible

Rather than `g_output_stream_splice()`, where the input is a regular
file.

See https://github.com/GNOME/libglnx/pull/44 for some more information.

I didn't try to measure the performance difference, but seeing the
read()/write() to/from userspace mixed in with the pointless `poll()` annoyed me
when reading strace.

As a bonus, we will again start using reflinks (if available) for `/etc`,
which is a regression from the https://github.com/ostreedev/ostree/pull/797
changes (which before used `glnx_file_copy_at()`).

Also, for the first time we'll use reflinks when doing commits from file-backed
content. This happens in `rpm-ostree compose tree` today for example.

Update submodule: libglnx

Closes: #817
Approved by: jlebon
libglnx
src/libostree/ostree-repo-checkout.c
src/libostree/ostree-repo-commit.c
tests/ci-commitmessage-submodules.sh